-- GENERATED SPELL FOR [Bloodsail Mage] --


function spell0_1562(pUnit, Event) --@Fire Shield III,n/a--
pUnit:FullCastSpellOnTarget(2601,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1562', 31000, 1)
end

function spell1_1562(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(20823,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1562', 3000, 1)
end

function Sorts_1562(pUnit, Event)
local choix_sorts_1562 = math.random(0, 1)
if choix_sorts_1562 == 0 then
pUnit:RegisterEvent('spell0_1562', 1, 1)
end
if choix_sorts_1562 == 1 then
pUnit:RegisterEvent('spell1_1562', 1, 1)
end
end

function mob1562_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1562', math.random(1500, 3000), 1)
end

function mob1562_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1562_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1562_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1562, 1, 'mob1562_Action')
RegisterUnitEvent(1562, 2, 'mob1562_Leave')
RegisterUnitEvent(1562, 3, 'mob1562_Kill')
RegisterUnitEvent(1562, 4, 'mob1562_Die')
